<template>
  <div style="    margin-top: 20px;margin-left: 20px;">
    <h1 style="color: ;">订单管理</h1>
  </div>
  <el-breadcrumb :separator-icon="ArrowRight" style="margin-top: 15px;margin-left: 30px;">
    <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
    <el-breadcrumb-item>交易支付管理</el-breadcrumb-item>
    <el-breadcrumb-item>订单管理</el-breadcrumb-item>
  </el-breadcrumb>
  <div>
    <el-form :inline="true" class="search-form">
      <el-form-item label="订单id：">
        <el-input
          placeholder="请输入订单id"
        />
      </el-form-item>
      <el-form-item label="订单状态：">
        <el-input
          placeholder="请输入0，1，2，3，4"
        />
      </el-form-item>

      <el-form-item>
        <el-button type="primary">查询</el-button>
         <el-button type="primary">添加</el-button>
      </el-form-item>
    </el-form>

    <el-table  border style="width: 100%">
      <el-table-column prop="orderid" label="订单id" width="190" />
      <el-table-column prop="userid" label="用户id" width="180" />
      <el-table-column prop="ordertime" label="下单时间" width="180" />
      <el-table-column prop="amount" label="订单金额" width="180" />
      <el-table-column prop="state" label="订单状态">
        <template #default="scope">
          <el-button
            link
            type="primary"
            size="small"
            v-for="item in scope.row.roles"
            :key="item.role"
          >
            {{ item.roleName }}
          </el-button>
        </template>
      </el-table-column>
      <el-table-column prop="role" label="操作">
        <template #default="scope">
          <el-button
            link
            type="primary"
            size="small"
          >
            编辑
          </el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script setup lang="ts">
</script>

<style scoped>
.search-form {
  padding: 10px 0 0 10px;
}
</style>